package com.knightcloud.micro.upms.api.dto;

import com.knightcloud.micro.upms.api.entity.SysUser;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

import java.time.LocalDate;

/**
 * 系统用户信息dto
 *
 * @author knight
 */
@Getter
@Setter
@ToString
@NoArgsConstructor
public class SysUserInfoDto {

	/**
	 * 用户名
	 */
	private String username;

	/**
	 * 头像
	 */
	private String avatar;

	/**
	 * 名字
	 */
	private String name;

	/**
	 * 性别
	 */
	private Integer gender;

	/**
	 * 电话
	 */
	private String phone;

	/**
	 * 电子邮件
	 */
	private String email;

	/**
	 * 出生
	 */
	private LocalDate birth;

	public SysUserInfoDto(SysUser sysUser) {
		this.username = sysUser.getSuUsername();
		this.avatar = sysUser.getSuAvatar();
		this.name = sysUser.getSuName();
		this.gender = sysUser.getSuGender();
		this.phone = sysUser.getSuPhone();
		this.email = sysUser.getSuEmail();
		this.birth = sysUser.getSuBirth();
	}

}
